package org.geektimes.rest.model;

import com.fasterxml.jackson.annotation.JsonInclude;


/**
 * @author: zhangsw
 * @createDate: 2020/11/26 16:36
 * @description: 通用request
 * @updateUser: zhangsw
 * @updateDate: 2020/11/26 16:36
 * @updateRemark:
 * @version: 1.0
*/
public class CommonRequest<T> {

	//用户id，有填无不填
	private String userId;

	//设备id
	private String machineId;

	//版本号
	private String version;

	//来源 ，安卓苹果小程序...
	private String sourceType;

	//前端传入traceId
	private String traceId;

	//针对data的加密规则验签
	private String sign;

	private String ip;

	//转发渠道 dzcc/dzmb
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private String redirectChannel;

	//转发路径后缀
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private String redirectKey;

	private String token;
	
	private PayRefundRequest data;

	private String param;

	private String wxCode;

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getMachineId() {
		return machineId;
	}

	public void setMachineId(String machineId) {
		this.machineId = machineId;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getSourceType() {
		return sourceType;
	}

	public void setSourceType(String sourceType) {
		this.sourceType = sourceType;
	}

	public String getTraceId() {
		return traceId;
	}

	public void setTraceId(String traceId) {
		this.traceId = traceId;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getRedirectChannel() {
		return redirectChannel;
	}

	public void setRedirectChannel(String redirectChannel) {
		this.redirectChannel = redirectChannel;
	}

	public String getRedirectKey() {
		return redirectKey;
	}

	public void setRedirectKey(String redirectKey) {
		this.redirectKey = redirectKey;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public PayRefundRequest getData() {
		return data;
	}

	public void setData(PayRefundRequest data) {
		this.data = data;
	}

	public String getParam() {
		return param;
	}

	public void setParam(String param) {
		this.param = param;
	}

	public String getWxCode() {
		return wxCode;
	}

	public void setWxCode(String wxCode) {
		this.wxCode = wxCode;
	}

	@Override
	public String toString() {
		return "CommonRequest{" +
				"userId='" + userId + '\'' +
				", machineId='" + machineId + '\'' +
				", version='" + version + '\'' +
				", sourceType='" + sourceType + '\'' +
				", traceId='" + traceId + '\'' +
				", sign='" + sign + '\'' +
				", ip='" + ip + '\'' +
				", redirectChannel='" + redirectChannel + '\'' +
				", redirectKey='" + redirectKey + '\'' +
				", token='" + token + '\'' +
				", data=" + data +
				", param='" + param + '\'' +
				", wxCode='" + wxCode + '\'' +
				'}';
	}
}
